
#include <errno.h>
#include <string.h>

char* strerror_r(int errnum, char *buffer, size_t n)
{
  char *error;
  error = strerror (errnum);

  return strncpy (buffer, (const char *)error, n);
};
